import React from 'react'
import { useContext } from 'react'
// 接收时，首先导入 context对象
import context from '../context'
export default function Son() {
    let {name,age,getData} = useContext(context)
    console.log('son data: ', getData)
    return (
        <div>
            <h3>Son</h3>
            <p><button onClick={()=>{
                getData(123)
            }}>son 给 app传数据</button></p>
        </div>
    )
}
